package com.itheima.advantagesup.entity;

import com.itheima.advantagesup.vo.MenuVO;
import com.itheima.advantagesup.vo.RoleVO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class SysRole {
    private String id;
    private String name;
    private String description;
    private LocalDateTime createDate;
    private LocalDateTime updateDate;
    private String remarks;
    private String delFlag;
    private String superadmin;
    private String defaultData;
    private String roleId;
    private String roleMenus;
    private List<MenuVO> authList;
    public RoleVO getRoleVO(){
        RoleVO roleVO = new RoleVO();
        roleVO.setId(id);
        roleVO.setName(name);
        roleVO.setDescription(description);
        roleVO.setCreate_date(createDate);
        roleVO.setUpdate_date(updateDate);
        roleVO.setRemarks(remarks);
        roleVO.setDel_flag(delFlag);
        roleVO.setSuperadmin(superadmin);
        roleVO.setDefault_data(defaultData);
        roleVO.setRole_id(roleId);
        roleVO.setRole_menus(roleMenus);
        roleVO.setAuthList(authList);
        return roleVO;
    }
}